package com.xsdl.memento;

public class InputText {

    private StringBuilder content;

    public InputText() {
        this.content = new StringBuilder();
    }

    public void addContent(String text) {
        this.content.append(text);
    }

    public void restoreFromSnapshot(Snapshot snapshot) {
        this.content.replace(0, this.content.length(), snapshot.getText());
    }

    public String getContent() {
        return this.content.toString();
    }

}
